package com.april.pattern.behavioral.visitor;

/**
 * @author April
 * @version V1.0.0
 * @date 2019/07/09 17:11
 * @description
 */
public class VisitorImpl implements Visitor {
    @Override
    public void visit(FreeCourse freeCourse) {
        System.out.println("免费课程:" + freeCourse.getName());
    }

    @Override
    public void visit(CodingCourse codingCourse) {
        System.out.println("实战课程:" + codingCourse.getName() + " 价格:" + codingCourse.getPrice() + "元");
    }
}
